# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 0.10.0
    Contact: thegrumpydictator@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class PiggyBankUpdate(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'account_id': 'int',
        'current_amount': 'float',
        'name': 'str',
        'notes': 'str',
        'start_date': 'date',
        'target_amount': 'float',
        'target_date': 'date'
    }

    attribute_map = {
        'account_id': 'account_id',
        'current_amount': 'current_amount',
        'name': 'name',
        'notes': 'notes',
        'start_date': 'start_date',
        'target_amount': 'target_amount',
        'target_date': 'target_date'
    }

    def __init__(self, account_id=None, current_amount=None, name=None, notes=None, start_date=None, target_amount=None, target_date=None):  # noqa: E501
        """PiggyBankUpdate - a model defined in OpenAPI"""  # noqa: E501

        self._account_id = None
        self._current_amount = None
        self._name = None
        self._notes = None
        self._start_date = None
        self._target_amount = None
        self._target_date = None
        self.discriminator = None

        self.account_id = account_id
        if current_amount is not None:
            self.current_amount = current_amount
        self.name = name
        if notes is not None:
            self.notes = notes
        if start_date is not None:
            self.start_date = start_date
        self.target_amount = target_amount
        if target_date is not None:
            self.target_date = target_date

    @property
    def account_id(self):
        """Gets the account_id of this PiggyBankUpdate.  # noqa: E501


        :return: The account_id of this PiggyBankUpdate.  # noqa: E501
        :rtype: int
        """
        return self._account_id

    @account_id.setter
    def account_id(self, account_id):
        """Sets the account_id of this PiggyBankUpdate.


        :param account_id: The account_id of this PiggyBankUpdate.  # noqa: E501
        :type: int
        """
        if account_id is None:
            raise ValueError("Invalid value for `account_id`, must not be `None`")  # noqa: E501

        self._account_id = account_id

    @property
    def current_amount(self):
        """Gets the current_amount of this PiggyBankUpdate.  # noqa: E501


        :return: The current_amount of this PiggyBankUpdate.  # noqa: E501
        :rtype: float
        """
        return self._current_amount

    @current_amount.setter
    def current_amount(self, current_amount):
        """Sets the current_amount of this PiggyBankUpdate.


        :param current_amount: The current_amount of this PiggyBankUpdate.  # noqa: E501
        :type: float
        """

        self._current_amount = current_amount

    @property
    def name(self):
        """Gets the name of this PiggyBankUpdate.  # noqa: E501


        :return: The name of this PiggyBankUpdate.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this PiggyBankUpdate.


        :param name: The name of this PiggyBankUpdate.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

    @property
    def notes(self):
        """Gets the notes of this PiggyBankUpdate.  # noqa: E501


        :return: The notes of this PiggyBankUpdate.  # noqa: E501
        :rtype: str
        """
        return self._notes

    @notes.setter
    def notes(self, notes):
        """Sets the notes of this PiggyBankUpdate.


        :param notes: The notes of this PiggyBankUpdate.  # noqa: E501
        :type: str
        """

        self._notes = notes

    @property
    def start_date(self):
        """Gets the start_date of this PiggyBankUpdate.  # noqa: E501


        :return: The start_date of this PiggyBankUpdate.  # noqa: E501
        :rtype: date
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this PiggyBankUpdate.


        :param start_date: The start_date of this PiggyBankUpdate.  # noqa: E501
        :type: date
        """

        self._start_date = start_date

    @property
    def target_amount(self):
        """Gets the target_amount of this PiggyBankUpdate.  # noqa: E501


        :return: The target_amount of this PiggyBankUpdate.  # noqa: E501
        :rtype: float
        """
        return self._target_amount

    @target_amount.setter
    def target_amount(self, target_amount):
        """Sets the target_amount of this PiggyBankUpdate.


        :param target_amount: The target_amount of this PiggyBankUpdate.  # noqa: E501
        :type: float
        """
        if target_amount is None:
            raise ValueError("Invalid value for `target_amount`, must not be `None`")  # noqa: E501

        self._target_amount = target_amount

    @property
    def target_date(self):
        """Gets the target_date of this PiggyBankUpdate.  # noqa: E501


        :return: The target_date of this PiggyBankUpdate.  # noqa: E501
        :rtype: date
        """
        return self._target_date

    @target_date.setter
    def target_date(self, target_date):
        """Sets the target_date of this PiggyBankUpdate.


        :param target_date: The target_date of this PiggyBankUpdate.  # noqa: E501
        :type: date
        """

        self._target_date = target_date

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, PiggyBankUpdate):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
